/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author Caps
 */
@Embeddable
public class TurmaPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "prdltv_prdletivo")
    private int prdltvPrdletivo;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2147483647)
    @Column(name = "crs_codigo")
    private String crsCodigo;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2147483647)
    @Column(name = "dsc_codigo")
    private String dscCodigo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "trmcbc_serie")
    private int trmcbcSerie;
    @Basic(optional = false)
    @NotNull
    @Column(name = "trmcbc_sequencia")
    private int trmcbcSequencia;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2147483647)
    @Column(name = "trm_codigo")
    private String trmCodigo;

    public TurmaPK() {
    }

    public TurmaPK(int prdltvPrdletivo, String crsCodigo, String dscCodigo, int trmcbcSerie, int trmcbcSequencia, String trmCodigo) {
        this.prdltvPrdletivo = prdltvPrdletivo;
        this.crsCodigo = crsCodigo;
        this.dscCodigo = dscCodigo;
        this.trmcbcSerie = trmcbcSerie;
        this.trmcbcSequencia = trmcbcSequencia;
        this.trmCodigo = trmCodigo;
    }

    public int getPrdltvPrdletivo() {
        return prdltvPrdletivo;
    }

    public void setPrdltvPrdletivo(int prdltvPrdletivo) {
        this.prdltvPrdletivo = prdltvPrdletivo;
    }

    public String getCrsCodigo() {
        return crsCodigo;
    }

    public void setCrsCodigo(String crsCodigo) {
        this.crsCodigo = crsCodigo;
    }

    public String getDscCodigo() {
        return dscCodigo;
    }

    public void setDscCodigo(String dscCodigo) {
        this.dscCodigo = dscCodigo;
    }

    public int getTrmcbcSerie() {
        return trmcbcSerie;
    }

    public void setTrmcbcSerie(int trmcbcSerie) {
        this.trmcbcSerie = trmcbcSerie;
    }

    public int getTrmcbcSequencia() {
        return trmcbcSequencia;
    }

    public void setTrmcbcSequencia(int trmcbcSequencia) {
        this.trmcbcSequencia = trmcbcSequencia;
    }

    public String getTrmCodigo() {
        return trmCodigo;
    }

    public void setTrmCodigo(String trmCodigo) {
        this.trmCodigo = trmCodigo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) prdltvPrdletivo;
        hash += (crsCodigo != null ? crsCodigo.hashCode() : 0);
        hash += (dscCodigo != null ? dscCodigo.hashCode() : 0);
        hash += (int) trmcbcSerie;
        hash += (int) trmcbcSequencia;
        hash += (trmCodigo != null ? trmCodigo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TurmaPK)) {
            return false;
        }
        TurmaPK other = (TurmaPK) object;
        if (this.prdltvPrdletivo != other.prdltvPrdletivo) {
            return false;
        }
        if ((this.crsCodigo == null && other.crsCodigo != null) || (this.crsCodigo != null && !this.crsCodigo.equals(other.crsCodigo))) {
            return false;
        }
        if ((this.dscCodigo == null && other.dscCodigo != null) || (this.dscCodigo != null && !this.dscCodigo.equals(other.dscCodigo))) {
            return false;
        }
        if (this.trmcbcSerie != other.trmcbcSerie) {
            return false;
        }
        if (this.trmcbcSequencia != other.trmcbcSequencia) {
            return false;
        }
        if ((this.trmCodigo == null && other.trmCodigo != null) || (this.trmCodigo != null && !this.trmCodigo.equals(other.trmCodigo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modelo.TurmaPK[ prdltvPrdletivo=" + prdltvPrdletivo + ", crsCodigo=" + crsCodigo + ", dscCodigo=" + dscCodigo + ", trmcbcSerie=" + trmcbcSerie + ", trmcbcSequencia=" + trmcbcSequencia + ", trmCodigo=" + trmCodigo + " ]";
    }
    
}
